package com.dehui.traders.ui.me;

import com.dehui.traders.databinding.ActivityMeBinding;

import com.dehui.traders.R;
import com.dehui.traders.BR;
import com.squareup.picasso.Picasso;

import me.goldze.mvvmhabit.base.BaseFragment;

public class MeFragment extends BaseFragment<ActivityMeBinding,MeViewModel>{

    @Override
    public int initContentView() {
        return R.layout.activity_me;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public MeViewModel initViewModel() {
        return new MeViewModel(getContext(),this);
    }

    @Override
    public void onResume() {
        super.onResume();
        viewModel.initUser();
    }

    public void setHeadImage(String url) {
        Picasso.with(getActivity())
                .load(url)
                .into(binding.imageview);
    }
}
